<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Milton</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="icon" href="/wwwroot/images/favicon.ico" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"
    />
  <link href="/wwwroot/css/app.css" rel="preload" as="style"><link href="/wwwroot/js/app.js" rel="preload" as="script"><link href="/wwwroot/css/app.css" rel="stylesheet"></head>

  <body>
    <header>
      <div class="navbar">
        <div class="container-fluid d-flex justify-content-between">
          <span class="navbar-brand d-flex align-items-center ellipsis">
            <img
              src="/wwwroot/images/logo.svg"
              alt="Milton logo"
              class="logo"
            />
            <span>Milton Java Webdav Server Library</span>
          </span>
          <button
            class="navbar-toggler burger-button d-lg-none js-collapse"
            type="button"
            data-toggle="collapse"
            data-target="#infoPanel"
            aria-expanded="false"
            aria-controls="infoPanel"
          >
            <div class="burger-icon">
              <span></span><span></span><span></span>
            </div>
          </button>
        </div>
      </div>
    </header>
    <main role="main" class="main-container container-fluid px-0">
      <div class="main-row row no-gutters">
        <div
          id="leftPanel"
          class="col-12 col-lg-8 col-xl-9 mt-3 px-3 px-lg-4 order-2 order-lg-1"
        >
          <div id="app"></div>
        </div>
        <div
          id="infoPanel"
          class="info-panel collapse d-lg-block col-12 col-lg-4 col-xl-3 order-1 order-lg-2"
        >
          <div class="pb-5 px-lg-3">
            <div class="container-fluid justify-content-between">
              <div class="row">
                <div class="col">
                  <p>
                    This page is displayed when user accesses any folder on your
                    WebDAV server in a web browser. You can customize this page
                    to your needs.
                  </p>
                </div>
              </div>
              <div class="row blocks">
                <div class="col-12 pb-3">
                  <h3>Test Your Server</h3>
                  <p>
                    To test your WebDAV server you can run Ajax integration
                    tests right from this page.
                  </p>
                  <a
                    href="javascript:void(0)"
                    onclick="OpenTestsWindow()"
                    class="align-self-start btn btn-primary"
                    role="button"
                    >Run Integration Tests</a
                  >
                </div>
                <div class="col-12 pb-3">
                  <h3>Editing Microsoft Office and Other Docs</h3>
                  <p>
                    You can open for editing Microsoft Office docs, PDF and any
                    other types of files directly from this web page and save
                    back to server without download/upload steps.
                  </p>
                </div>
              </div>
              <div class="row mt-1">
                <div class="col">
                  <p class="versions">
                    Milton Webdav Server Library Java.
                  </p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </main>

    <script>
      var webDavSettings = {
        ApplicationPath: "/",
        ApplicationSocketRelativePath: "/_ws",
        ApplicationProtocolsPath: "/wwwroot/js/node_modules/webdav.client/Plugins/",
        LicenseId: null,
        EditDocAuth: {
          Authentication: "anonymous", // Authentication to use when opening documents for editing: 'anonymous', 'challenge', 'ms-ofba', 'cookies'
          CookieNames: null, // Coma separated list of cookie names to search for.
          SearchIn: null, // Web browsers to search and copy permanent cookies from: 'current', 'none'.
          LoginUrl: null // Login URL to redirect to in case any cookies specified in CookieNames parameter are not found.
        }
      };

      function OpenTestsWindow() {
        var width = Math.round(screen.width * 0.5);
        var height = Math.round(screen.height * 0.8);
        window.open("/wwwroot/AjaxIntegrationTests.html", "", "menubar=1,location=1,status=1,scrollbars=1,resizable=1,width=" + width + ",height=" + height);
      }
    </script>
    <script type="text/javascript" src="/wwwroot/js/app.js"></script></body>
    <script type="text/javascript" src="/wwwroot/js/collapse.js"></script></body>
</html>
